extends ./index.jade

block content
	.rightSide
		.container-fluid
			.row
				label 学校
				select#school
			.row.form-inline
				a.btn.btn-primary.col-sm-1(role='button'  href='/views/add_canteen.html') 新增食堂
				#tips.h4.text-danger.col-sm-4 查询中，请稍候
			.row
				table#table_canteen.table.table-bordered.table-hover.center
					thead
						tr
							th 学校
							th 食堂
							th 有赞地址
							th 操作
					tbody#canteen
			#paginator_canteen.row.text-right.forcedVerticalCenter
				span
					|共
					span#total
					|条记录
				#paginator.paginator 分页




	link(rel='stylesheet' href='/css/lib/select2.min.css')
	script#template_school(type='text/dot-tpl')
		|{{~it:value:index}}
		option(value='{{=value.id}}') {{=value.name}}
		|{{~}}
	script#template_canteen(type='text/dot-tpl')
		|{{~it:value:index}}
		tr(id='{{=value.shop_id}}')
			td {{=value.school_name}}
			td {{=value.shop_name}}
			td
				a(href='{{=value.shop_url}}' target='_Blank') 点我查看有赞页面
			td
				a.btn.btn-primary(role='button' data-target='{{=value.shop_id}}' onclick='myFun.deleteCanteen(this)') 删除
				a.btn.btn-default(role='button' data-target='{{=value.shop_id}}' onclick='myFun.changeCanteen(this)') 修改
		|{{~}}



	script(src="/js/lib/require.js" data-main="/js/canteen_manage")